package com.insurance.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.io.Serializable;
import java.text.SimpleDateFormat;
import java.util.Date;

import com.insurance.enums.OrderStateEnum;
import lombok.Data;

/**
 * 订单
 * 
 * @date 2020-08-31 15:59:19
 */
@Data
@TableName("tb_order")
public class OrderEntity implements Serializable {

	private static final long serialVersionUID = 1L;

	private static SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");

	/**
	 * $column.comments
	 */
	@TableId
	private String orderId;
	/**
	 * $column.comments
	 */
	private String orderNo;
	/**
	 * $column.comments
	 */
	private String proposalId;
	/**
	 * $column.comments
	 */
	private String proposalNo;
	/**
	 * $column.comments
	 */
	private String productId;
	/**
	 * $column.comments
	 */
	private String productName;
	/**
	 * $column.comments
	 */
	private String orderPrice;
	/**
	 * $column.comments
	 */

	private String caseId;

	private String caseName;
	/**
	 * $column.comments
	 */
	private String casePrice;
	/**
	 * $column.comments
	 */
	private Date createTime;
	/**
	 * $column.comments
	 */
	private String createPersonId;
	/**
	 * $column.comments
	 */
	private String telephone;
	/**
	 * $column.comments
	 */
	private String cardId;
	/**
	 * $column.comments
	 */
	private Date updateTime;

	/**
	 * 修改人id
	 */
	private String updatePersonId;
	/**
	 * $column.comments
	 */
	private String payType;
	/**
	 * $column.comments
	 */
	private Date payTime;
	/**
	 * $column.comments
	 */
	private String transactionId;
	/**
	 * $column.comments
	 */
	private String serialNumber;
	/**
	 * $column.comments
	 */
	private String sign;
	/**
	 * $column.comments
	 */
	private Long excelLogId;
	/**
	 * $column.comments
	 */
	private String appId;
	/**
	 * $column.comments
	 */
	private String orderState;

	private String deleteFlag;

	@TableField(exist=false)
	private String insuraceNo;

	@TableField(exist=false)
	private String applicationCustomerName;

	@TableField(exist=false)
	private String insuranceCompany;

	@TableField(exist=false)
	private String createTimeText;

	public String getCreateTimeText() {
		return this.createTime != null ? dateFormat.format(this.createTime) : "";
	}

	public void setCreateTimeText(String createTimeText) {
		this.createTimeText = createTimeText;
	}

	@TableField(exist=false)
	private String payTimeText;

	public String getPayTimeText() {
		return this.payTime != null ? dateFormat.format(this.payTime) : "";
	}

	public void setPayTimeText(String payTimeText) {
		this.payTimeText = payTimeText;
	}

	@TableField(exist=false)
	private String orderStateText;

	public String getOrderStateText() {
		return OrderStateEnum.getMsg(this.orderState);
	}

	public void setOrderStateText(String orderStateText) {
		this.orderStateText = orderStateText;
	}

	@TableField(exist=false)
	private String orderIdText;

	public String getOrderIdText() {
		return String.valueOf(this.orderId);
	}

	public void setOrderIdText(String orderIdText) {
		this.orderIdText = orderIdText;
	}

	@TableField(exist=false)
	private String proposalIdText;

	public String getProposalIdText() {
		return String.valueOf(this.proposalId);
	}

	public void setProposalIdText(String proposalIdText) {
		this.proposalIdText = proposalIdText;
	}

	@TableField(exist=false)
	private String subjectIdText;

	public String getSubjectIdText() {
		return subjectIdText;
	}

	public void setSubjectIdText(String subjectIdText) {
		this.subjectIdText = subjectIdText;
	}

	/**
	 * 是否打印发票, 1：已打印, 0：未打印
	 */
	@TableField(exist=false)
	private String isPrintInvoice;

	public String getIsPrintInvoice() {
		return isPrintInvoice;
	}

	public void setIsPrintInvoice(String isPrintInvoice) {
		this.isPrintInvoice = isPrintInvoice;
	}
}
